/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sreams;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;

/**
 *
 * @author Educacionit
 */
public class Escritor {
    public static void main (String[] args) {

        File archivo = new File("salida.txt");
        FileWriter out = null;
        BufferedWriter buff = null;
        try {
            out = new FileWriter(archivo);
            buff = new BufferedWriter(out);
            String info = "Uno es lo que hace y no lo que dice ser";

            for (int i=0; i<info.length();i++) {
                buff.write(info.charAt(i));
            }

        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
            out.close();
            } catch (Exception e ){
                e.printStackTrace();
            }
        }

    }
}
